package org.linlinjava.litemall.db.models;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.Version;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.math.BigDecimal;
import java.time.LocalDateTime;

@Getter
@Setter
@ToString
@EqualsAndHashCode(callSuper = false)
@TableName("t_order")
public class Order extends BaseModel {

    @TableField("user_id")
    private Long userId;

    @TableField("order_sn")
    private String orderSn;

    @TableField("order_status")
    private Short orderStatus;

    //售后状态，0是可申请，1是用户已申请，2是管理员审核通过，3是管理员退款成功，4是管理员审核拒绝，5是用户已取消
    @TableField("after_sale_status")
    private Short afterSaleStatus;

    @TableField("consignee")
    private String consignee;

    @TableField("mobile")
    private String mobile;

    @TableField("address")
    private String address;

    @TableField("message")
    private String message;

    @TableField("goods_price")
    private BigDecimal goodsPrice;

    @TableField("freight_price")
    private BigDecimal freightPrice;

    @TableField("coupon_price")
    private BigDecimal couponPrice;

    @TableField("integral_price")
    private BigDecimal integralPrice;

    @TableField("groupon_price")
    private BigDecimal grouponPrice;

    @TableField("order_price")
    private BigDecimal orderPrice;

    @TableField("actual_price")
    private BigDecimal actualPrice;

    @TableField("pay_id")
    private String payId;

    @TableField("pay_time")
    private LocalDateTime payTime;

    @TableField("ship_sn")
    private String shipSn;

    @TableField("ship_channel")
    private String shipChannel;

    @TableField("ship_time")
    private LocalDateTime shipTime;

    @TableField("refund_amount")
    private BigDecimal refundAmount;

    @TableField("refund_type")
    private String refundType;

    @TableField("refund_content")
    private String refundContent;

    @TableField("refund_time")
    private LocalDateTime refundTime;

    @TableField("confirm_time")
    private LocalDateTime confirmTime;

    @TableField("comments")
    private Integer comments;

    @TableField("end_time")
    private LocalDateTime endTime;

    @Version
    private Long version;
}